The full version of SQL Server includes three main parts or groups of functions. Note that there are no built-in tools for creating a user interface (front end) to the database. That is left to tools such as Windows Forms or ASP.NET for Web pages. The three main parts of SQL Server include:



  • The SQL Server engine, which actually organizes the data and reads or writes in response to commands in code. This also includes tools such as the Query Analyzer and Data Transformation Services.

  • SQL Management Studio (or Enterprise Manager in older versions), which provides a central point for all database management functions, including the creation of new databases.

  • Tools for administering a database, ranging from backup utilities to replication schemes.


Example: Demonstrate accessing SQL SERVER database.


 


 


<% @ Page Language ="C#" AutoEventWireup ="true" CodeFile ="SqlDataSource.aspx.cs" Inherits ="SqlDataSource" %>


 


<! DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">


 


<html xmlns ="http://www.w3.org/1999/xhtml" >


<head runat ="server">


</head >


<body >


<form id ="form1" runat ="server">


<div >


<asp:SqlDataSource ID ="SqlDataSource1" runat ="server" ConnectionString =" <% $ ConnectionStrings:pubsConnectionString %> " SelectCommand ="SELECT [emp_id], [fname], [lname], [minit], [job_id], [job_lvl], [pub_id], [hire_date] FROM [employee] ORDER BY [fname]">


</asp:SqlDataSource>


</div >


<asp:GridView ID ="GridView1" runat ="server" AllowPaging ="True" AllowSorting ="True" AutoGenerateColumns ="False" DataKeyNames ="emp_id"


DataSourceID ="SqlDataSource1">


<Columns >


<asp:BoundField DataField ="emp_id" HeaderText ="emp_id" ReadOnly ="True" SortExpression ="emp_id" />


<asp:BoundField DataField ="fname" HeaderText ="fname" SortExpression ="fname" />


<asp:BoundField DataField ="lname" HeaderText ="lname" SortExpression ="lname" />


<asp:BoundField DataField ="minit" HeaderText ="minit" SortExpression ="minit" />


<asp:BoundField DataField ="job_id" HeaderText ="job_id" SortExpression ="job_id"/>


<asp:BoundField DataField ="job_lvl" HeaderText ="job_lvl" SortExpression="job_lvl"/>


<asp:BoundField DataField ="pub_id" HeaderText ="pub_id" SortExpression ="pub_id"/>


<asp:BoundField DataField ="hire_date" HeaderText ="hire_date" SortExpression ="hire_date" />


</Columns >


</asp:GridView>


</form >


</body >


</html >


 

                    

Copyright © 2012 VisualBuilder. All rights reserved